#ifndef __USER_CAMERA_H__
#define __USER_CAMERA_H__

#include "esp_err.h"
#include "esp_log.h"
#include "esp_system.h"
#include <string.h>

// 摄像头
// #define CAM_PIN_PWDN -1  // power down is not used
// #define CAM_PIN_RESET -1 //
// #define CAM_PIN_XCLK 0
// #define CAM_PIN_SIOD -1 // 配置为-1, 驱动会获取I2C0作为默认I2C总线
// #define CAM_PIN_SIOC -1

// #define CAM_PIN_D7 36
// #define CAM_PIN_D6 37
// #define CAM_PIN_D5 38
// #define CAM_PIN_D4 39
// #define CAM_PIN_D3 34
// #define CAM_PIN_D2 35
// #define CAM_PIN_D1 32
// #define CAM_PIN_D0 33
// #define CAM_PIN_VSYNC 27
// #define CAM_PIN_HREF 14
// #define CAM_PIN_PCLK 13

#define CAM_PIN_PWDN 32  // power down is not used
#define CAM_PIN_RESET -1 //
#define CAM_PIN_XCLK 0
#define CAM_PIN_SIOD 26 // 配置为-1, 驱动会获取I2C0作为默认I2C总线
#define CAM_PIN_SIOC 27

#define CAM_PIN_D7 35
#define CAM_PIN_D6 34
#define CAM_PIN_D5 39
#define CAM_PIN_D4 36
#define CAM_PIN_D3 21
#define CAM_PIN_D2 19
#define CAM_PIN_D1 18
#define CAM_PIN_D0 5
#define CAM_PIN_VSYNC 25
#define CAM_PIN_HREF 23
#define CAM_PIN_PCLK 22


esp_err_t init_camera(void);
esp_err_t camera_capture(const char *filePath);
esp_err_t get_capture(const char *filepath);

#endif // __USER_CAMERA_H__